
<script>
    var opensdk_list = <%-JSON.stringify(ret.opensdk)%>;
    var status_list = {0:'开发[sandbox]',1:'正式[production]',2:'禁用[disabled]'};
    var iptable_list = {0:'关闭',1:'启用'};
    var payment_list = {0:'关闭',1:'启用'};
    var o2g_list = {0:'关闭',1:'启用'};

    function edit_show(id){
        cosjs.layer.show("配置参数",GURL(handle,"configure?id="+id));
    }

    function editHref(id){
        var cmd = "edit_show('"+id+"');";
        return '<span style="color:#F00;cursor:pointer" onclick="'+cmd+'" >配置参数</span>';
    }

    var option = {
        colModel : [
            {label: 'id', name: '_id', width: 180, key:true,editable: true,sortable:true, resize:false,search:true,fixed:true},

            {label: '名称', name: 'name',width: 200, editable: true, sortable:false,hidden:false,resize:true,fixed:true,search:false},

            {label: '渠道', name: 'key',width: 200, editable: true, sortable:false,hidden:false,resize:true,fixed:true,search:true,
                formatter:'select', edittype:'select',
                editoptions:{value:opensdk_list},
                stype:"select",
                searchoptions:{value:opensdk_list}
            },

            {label: '状态', name: 'status',width: 120, editable: true, sortable:false,hidden:false,resize:false,fixed:true,search:true,
                formatter:'select', edittype:'select', editoptions:{value:status_list},
                stype:"select",
                searchoptions:{value:status_list}
            },

            {label: '数据互通', name: 'o2g',width: 80, editable: true, sortable:false,hidden:false,resize:false,fixed:true,search:true,
                formatter:'select', edittype:'select', editoptions:{value:o2g_list},
                stype:"select",
                searchoptions:{value:o2g_list}
            },
            {label: 'IP白名单', name: 'iptable',width: 80, editable: true, sortable:false,hidden:false,resize:false,fixed:true,search:false,
                formatter:'select', edittype:'select', editoptions:{value:iptable_list},
            },
            {label: 'IP黑名单', name: 'ipblock',width: 80, editable: true, sortable:false,hidden:false,resize:false,fixed:true,search:false,
                formatter:'select', edittype:'select', editoptions:{value:iptable_list},
            },
            {label: '前端版本', name: 'version',width: 80, editable: true, sortable:false,hidden:false,resize:false,fixed:true,search:false},

            {label: '支付', name: 'payment',width: 60, editable: true, sortable:false,hidden:false,resize:false,fixed:true,search:false,
                formatter:'select', edittype:'select', editoptions:{value:payment_list}
            },
            {label: '货币代码', name: 'cyt',width: 80, editable: true, sortable:false,hidden:false,resize:false,fixed:true,search:false },

            {label: '渠道配置', name: '_id',width: 180, editable: false,sortable:false, resize:true,search:false,fixed:false,search:false,
                formatter:editHref,
            },
        ],
    }
    $(document).ready(function () {
        cosjs_create_jqgrid(option);
    });
</script>
游戏至少接入一个以上渠道</br>
开发环境建议接入 [游客登录]</br>
审核及发布环境建议接入 [开发者]</br>
